package com.landiao.common.weixin.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.alibaba.fastjson.JSON;

/**
 * 企业号菜单
 *
 */
public class WxMenu implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3157002706302922672L;
	private List<WxMenuButton> button = new ArrayList<WxMenuButton>();

	public List<WxMenuButton> getButton() {
		return button;
	}

	public void setButton(List<WxMenuButton> button) {
		this.button = button;
	}

	public String toJson() {
		return JSON.toJSONString(this);
	}

	@Override
	public String toString() {
		return "WxMenu{" +
				"button=" + button +
				'}';
	}

	public static class WxMenuButton {

		private String type;
		private String name;
		private String key;
		private String url;

		private List<WxMenuButton> sub_button = new ArrayList<WxMenuButton>();

		public String getType() {
			return type;
		}

		public void setType(String type) {
			this.type = type;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public String getKey() {
			return key;
		}

		public void setKey(String key) {
			this.key = key;
		}

		public String getUrl() {
			return url;
		}

		public void setUrl(String url) {
			this.url = url;
		}

		public List<WxMenuButton> getSub_button() {
			return sub_button;
		}

		public void setSub_button(List<WxMenuButton> sub_button) {
			this.sub_button = sub_button;
		}

		@Override
		public String toString() {
			return "WxMenuButton{" +
					"type='" + type + '\'' +
					", name='" + name + '\'' +
					", key='" + key + '\'' +
					", url='" + url + '\'' +
					", sub_button=" + sub_button +
					'}';
		}
	}

}
